core: Further fix fallout from archive mode files
authorColin Walters <walters@verbum.org>
Fri, 24 Feb 2012 22:50:44 +0000 (17:50 -0500)
committerColin Walters <walters@verbum.org>
Fri, 24 Feb 2012 22:50:44 +0000 (17:50 -0500)
Continuing from 16c0cfe9b59e2c619d4c57be9c995849af9f659f, we now have
the problem that we're removing the executable bit, which obviously
breaks things when we chroot in for a build.  Fix this by masking over
our bits.

src/libostree/ostree-core.c

index 30bda716bb9acb1790e20aa1efd7fd6332e649bb..929d8345aa2c01d9cf470b3874429b8e98445a66 100644 (file)
@@ -687,9 +687,12 @@ ostree_create_file_from_input (GFile            *dest_file,
   if (finfo != NULL)
     {
       mode = g_file_info_get_attribute_uint32 (finfo, "unix::mode");
-      /* Archived content files should always be 0644 */
+      /* Archived content files should always be readable by all and
+       * read/write by owner.  If the base file is executable then
+       * we're also executable.
+       */
       if (is_archived_content)
-        mode = (mode & S_IFMT) | 0644;
+        mode |= 0644;
     }
   else
     {